Integrand size = 33, antiderivative size = 393 \[ \int \frac {\left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^2}{(g+h x)^3} \, dx=\frac {B (b c-a d) h n (a+b x) \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )}{(b g-a h)^2 (d g-c h) (g+h x)}+\frac {b^2 \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^2}{2 h (b g-a h)^2}-\frac {\left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^2}{2 h (g+h x)^2}+\frac {B^2 (b c-a d)^2 h n^2 \log \left (\frac {g+h x}{c+d x}\right )}{(b g-a h)^2 (d g-c h)^2}+\frac {B (b c-a d) (2 b d g-b c h-a d h) n \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \log \left (1-\frac {(d g-c h) (a+b x)}{(b g-a h) (c+d x)}\right )}{(b g-a h)^2 (d g-c h)^2}+\frac {B^2 (b c-a d) (2 b d g-b c h-a d h) n^2 \operatorname {PolyLog}\left (2,\frac {(d g-c h) (a+b x)}{(b g-a h) (c+d x)}\right )}{(b g-a h)^2 (d g-c h)^2} \]
[Out]
Time = 0.53 (sec) , antiderivative size = 393, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {2573, 2553, 2398, 2404, 2338, 2351, 31, 2354, 2438} \[ \int \frac {\left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^2}{(g+h x)^3} \, dx=\frac {b^2 \left (B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A\right )^2}{2 h (b g-a h)^2}+\frac {B h n (a+b x) (b c-a d) \left (B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A\right )}{(g+h x) (b g-a h)^2 (d g-c h)}+\frac {B n (b c-a d) (-a d h-b c h+2 b d g) \log \left (1-\frac {(a+b x) (d g-c h)}{(c+d x) (b g-a h)}\right ) \left (B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A\right )}{(b g-a h)^2 (d g-c h)^2}-\frac {\left (B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A\right )^2}{2 h (g+h x)^2}+\frac {B^2 n^2 (b c-a d) (-a d h-b c h+2 b d g) \operatorname {PolyLog}\left (2,\frac {(d g-c h) (a+b x)}{(b g-a h) (c+d x)}\right )}{(b g-a h)^2 (d g-c h)^2}+\frac {B^2 h n^2 (b c-a d)^2 \log \left (\frac {g+h x}{c+d x}\right )}{(b g-a h)^2 (d g-c h)^2} \]
[In]
[Out]
Rule 31
Rule 2338
Rule 2351
Rule 2354
Rule 2398
Rule 2404
Rule 2438
Rule 2553
Rule 2573
Rubi steps \begin{align*} \text {integral}& = \text {Subst}\left (\int \frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(g+h x)^3} \, dx,e \left (\frac {a+b x}{c+d x}\right )^n,e (a+b x)^n (c+d x)^{-n}\right ) \\ & = \text {Subst}\left ((b c-a d) \text {Subst}\left (\int \frac {(b-d x) \left (A+B \log \left (e x^n\right )\right )^2}{(b g-a h-(d g-c h) x)^3} \, dx,x,\frac {a+b x}{c+d x}\right ),e \left (\frac {a+b x}{c+d x}\right )^n,e (a+b x)^n (c+d x)^{-n}\right ) \\ & = -\frac {\left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^2}{2 h (g+h x)^2}+\text {Subst}\left (\frac {(B n) \text {Subst}\left (\int \frac {(b-d x)^2 \left (A+B \log \left (e x^n\right )\right )}{x (b g-a h+(-d g+c h) x)^2} \, dx,x,\frac {a+b x}{c+d x}\right )}{h},e \left (\frac {a+b x}{c+d x}\right )^n,e (a+b x)^n (c+d x)^{-n}\right ) \\ & = -\frac {\left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^2}{2 h (g+h x)^2}+\text {Subst}\left (\frac {(B n) \text {Subst}\left (\int \left (\frac {b^2 \left (A+B \log \left (e x^n\right )\right )}{(b g-a h)^2 x}+\frac {(b c-a d)^2 h^2 \left (A+B \log \left (e x^n\right )\right )}{(b g-a h) (d g-c h) (b g-a h-(d g-c h) x)^2}+\frac {(b c-a d) h (-2 b d g+b c h+a d h) \left (A+B \log \left (e x^n\right )\right )}{(b g-a h)^2 (d g-c h) (b g-a h-(d g-c h) x)}\right ) \, dx,x,\frac {a+b x}{c+d x}\right )}{h},e \left (\frac {a+b x}{c+d x}\right )^n,e (a+b x)^n (c+d x)^{-n}\right ) \\ & = -\frac {\left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^2}{2 h (g+h x)^2}+\text {Subst}\left (\frac {\left (b^2 B n\right ) \text {Subst}\left (\int \frac {A+B \log \left (e x^n\right )}{x} \, dx,x,\frac {a+b x}{c+d x}\right )}{h (b g-a h)^2},e \left (\frac {a+b x}{c+d x}\right )^n,e (a+b x)^n (c+d x)^{-n}\right )+\text {Subst}\left (\frac {\left (B (b c-a d)^2 h n\right ) \text {Subst}\left (\int \frac {A+B \log \left (e x^n\right )}{(b g-a h+(-d g+c h) x)^2} \, dx,x,\frac {a+b x}{c+d x}\right )}{(b g-a h) (d g-c h)},e \left (\frac {a+b x}{c+d x}\right )^n,e (a+b x)^n (c+d x)^{-n}\right )-\text {Subst}\left (\frac {(B (b c-a d) (2 b d g-b c h-a d h) n) \text {Subst}\left (\int \frac {A+B \log \left (e x^n\right )}{b g-a h+(-d g+c h) x} \, dx,x,\frac {a+b x}{c+d x}\right )}{(b g-a h)^2 (d g-c h)},e \left (\frac {a+b x}{c+d x}\right )^n,e (a+b x)^n (c+d x)^{-n}\right ) \\ & = \frac {B (b c-a d) h n (a+b x) \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )}{(b g-a h)^2 (d g-c h) (g+h x)}+\frac {b^2 \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^2}{2 h (b g-a h)^2}-\frac {\left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^2}{2 h (g+h x)^2}+\frac {B (b c-a d) (2 b d g-b c h-a d h) n \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \log \left (1-\frac {(d g-c h) (a+b x)}{(b g-a h) (c+d x)}\right )}{(b g-a h)^2 (d g-c h)^2}-\text {Subst}\left (\frac {\left (B^2 (b c-a d)^2 h n^2\right ) \text {Subst}\left (\int \frac {1}{b g-a h+(-d g+c h) x} \, dx,x,\frac {a+b x}{c+d x}\right )}{(b g-a h)^2 (d g-c h)},e \left (\frac {a+b x}{c+d x}\right )^n,e (a+b x)^n (c+d x)^{-n}\right )-\text {Subst}\left (\frac {\left (B^2 (b c-a d) (2 b d g-b c h-a d h) n^2\right ) \text {Subst}\left (\int \frac {\log \left (1+\frac {(-d g+c h) x}{b g-a h}\right )}{x} \, dx,x,\frac {a+b x}{c+d x}\right )}{(b g-a h)^2 (d g-c h)^2},e \left (\frac {a+b x}{c+d x}\right )^n,e (a+b x)^n (c+d x)^{-n}\right ) \\ & = \frac {B (b c-a d) h n (a+b x) \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )}{(b g-a h)^2 (d g-c h) (g+h x)}+\frac {b^2 \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^2}{2 h (b g-a h)^2}-\frac {\left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^2}{2 h (g+h x)^2}+\frac {B^2 (b c-a d)^2 h n^2 \log \left (\frac {g+h x}{c+d x}\right )}{(b g-a h)^2 (d g-c h)^2}+\frac {B (b c-a d) (2 b d g-b c h-a d h) n \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \log \left (1-\frac {(d g-c h) (a+b x)}{(b g-a h) (c+d x)}\right )}{(b g-a h)^2 (d g-c h)^2}+\frac {B^2 (b c-a d) (2 b d g-b c h-a d h) n^2 \text {Li}_2\left (\frac {(d g-c h) (a+b x)}{(b g-a h) (c+d x)}\right )}{(b g-a h)^2 (d g-c h)^2} \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(13182\) vs. \(2(393)=786\).
Time = 5.23 (sec) , antiderivative size = 13182, normalized size of antiderivative = 33.54 \[ \int \frac {\left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^2}{(g+h x)^3} \, dx=\text {Result too large to show} \]
[In]
[Out]
\[\int \frac {{\left (A +B \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right )\right )}^{2}}{\left (h x +g \right )^{3}}d x\]
[In]
[Out]
\[ \int \frac {\left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^2}{(g+h x)^3} \, dx=\int { \frac {{\left (B \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + A\right )}^{2}}{{\left (h x + g\right )}^{3}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {\left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^2}{(g+h x)^3} \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int \frac {\left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^2}{(g+h x)^3} \, dx=\int { \frac {{\left (B \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + A\right )}^{2}}{{\left (h x + g\right )}^{3}} \,d x } \]
[In]
[Out]
\[ \int \frac {\left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^2}{(g+h x)^3} \, dx=\int { \frac {{\left (B \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + A\right )}^{2}}{{\left (h x + g\right )}^{3}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {\left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^2}{(g+h x)^3} \, dx=\int \frac {{\left (A+B\,\ln \left (\frac {e\,{\left (a+b\,x\right )}^n}{{\left (c+d\,x\right )}^n}\right )\right )}^2}{{\left (g+h\,x\right )}^3} \,d x \]
[In]
[Out]